import axios from '@/libs/api.request'

/* 药店列表 */
export const shopList = () => {
  return axios.request({
    url: '/wl/shopList',
    type: 'get'
  })
}

/* 创建订单 */
export const createOrder = (data) => {
  return axios.request({
    url: '/wl/createOrder',
    data: data,
    type: 'post',
    php: true
  })
}

/* 获取用户信息 */
export const getUserInfo = (data) => {
  return axios.request({
    url: '/wl/getUserInfo',
    data: data,
    type: 'get',
    php: true
  })
}

/* 获取用户信息 */
export const orderList = () => {
  return axios.request({
    url: '/wl/orderList',
    type: 'get',
    php: true
  })
}

/* 获取用户信息 */
export const checkOrderList = () => {
  return axios.request({
    url: '/wl/checkOrderList',
    type: 'get',
    php: true
  })
}

/* 获取用户信息 */
export const checkOrder = (data) => {
  return axios.request({
    url: '/wl/checkOrder',
    data: data,
    type: 'get',
    php: true
  })
}

/* 获取用户信息 */
export const bindShopUser = (data) => {
  return axios.request({
    url: '/wl/bindShopUser',
    data: data,
    type: 'post',
    php: true
  })
}

/* 获取用户信息 */
export const isBindShopUser = () => {
  return axios.request({
    url: '/wl/isBindShopUser',
    type: 'get',
    php: true
  })
}

/* 管理员看到的订单列表 */
export const managerOrderList = () => {
  return axios.request({
    url: '/wl/managerOrderList',
    type: 'get',
    php: true
  })
}

/* 删除订单 */
export const delOrder = (id) => {
  return axios.request({
    url: '/wl/delOrder',
    data: { id: id },
    type: 'get',
    php: true
  })
}

/* 删除订单 */
export const getOrderInfo = (code) => {
  return axios.request({
    url: '/wl/getOrderInfo',
    data: { code: code },
    type: 'get',
    php: true
  })
}
/* 根据时间查询订单 */
export const checkOrderTimeList = (data) => {
  return axios.request({
    url: '/wl/checkOrderTimeList',
    data: data,
    type: 'get',
    php: true
  })
}
